// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'

/* 路由 */
import router from './router'

/* axios */
// import axios from './api'

import axios from 'axios'


// axios.defaults.baseURL='http://manage.hbyct9058.com/public/api';
axios.defaults.baseURL='http://www.hbyct9058.com/public/api';

Vue.prototype.http = axios;

// Vue.prototype.$base = 'http://manage.jolinmind.cn/public';
Vue.prototype.$base=`http://www.hbyct9058.com/public`


/* swiper */
import 'swiper/dist/css/swiper.min.css';

/* 重置样式 */
import './assets/css/reset.min.css'

/* jquery */
import 'jquery'

/* bootstarp */
import './assets/css/bootstrap.min.css'
import './assets/js/bootstrap.min'

/* animate.css */
import 'animate.css'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);

/* 头部组件 */
import Header from './components/Header'
Vue.component(Header.name,Header)

import Down from './components/Down'
Vue.component(Down.name,Down)


/* 尾部组件 */
import Footer from './components/Footer'
Vue.component(Footer.name,Footer)

/* 回到顶部 */
import GoTop from './components/GoTop'
Vue.component(GoTop.name,GoTop)

/* 返回 */
import Back from './components/Back'
Vue.component(Back.name,Back)

Vue.config.productionTip = false


router.beforeEach((to, from, next) => {
    if(to.meta.title){
      document.title = to.meta.title
    }
    next();
});

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
